rm update
[EroBeats.git] / Djinn and Tonic - Erobeats / SFX.cpp
blob88a74cfffb79178e1452e46ea367719411d3bd66
1 #include "SFX.h"
2 #include <iostream>
3 enum SFXKeys { Hover = 0, Click = 1 };
5 SFX::SFX()
7 std::cout << "intit\n";
9 Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 2000);
13 SFX::~SFX()
15 for (int i = 0; i < gameSFX->size(); i++) {
16 Mix_FreeChunk(gameSFX->at(i));
20 /**/
21 void SFX::playSFX(int track) {
22 Mix_PlayChannel(-1, gameSFX->at(track), 0);
26 bool SFX::isFinished(int channel) {
27 return false;
30 void SFX::setVolume(int level) {
31 int size = gameSFX->size();
32 for (int i = 0; i < size; i++) {
33 if (gameSFX->at(i) == NULL) {
34 std::cout << "miss\n";
35 continue;
37 std::cout<<Mix_VolumeChunk(gameSFX->at(i), MIX_MAX_VOLUME * level / 4)<<"- SFX Volume Level\n";